var http=require('http');
var option={
    host:'localhost',
    port:'8080',
    path:'/index.html'
}
var request=http.request(option,function (response) {
    //不断更新新数据
    var body='';
    response.on('data',function (data) {
        body+=data;
    });
    response.on('end',function () {
        //数据接收完成
        console.log(body);
    });
});

request.end();

